package com.diaohw.module.metadata.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.diaohw.module.metadata.obj.convert.DictionaryItemConvert;
import com.diaohw.module.metadata.obj.dto.DictionaryItemDTO;
import com.diaohw.module.metadata.obj.entity.DictionaryItemDO;
import com.diaohw.module.metadata.obj.query.DictionaryItemQuery;
import com.diaohw.module.metadata.obj.vo.DictionaryItemVO;
import com.diaohw.platform.common.obj.page.PageResultVo;

import java.util.List;

/**
 * <p>
 * 数据字典项信息表 服务类
 * </p>
 *
 * @author D-Hw
 * @since 2024-09-18
 */
public interface DictionaryItemService extends IService<DictionaryItemDO> {

    DictionaryItemConvert INSTANCE = DictionaryItemConvert.INSTANCE;

    /**
     * 新增
     */
    DictionaryItemVO create(DictionaryItemDTO data);

    /**
     * 更新
     */
    DictionaryItemVO update(String id, DictionaryItemDTO data);

    /**
     * 删除
     */
    Boolean delete(String id);

    /**
     * 依据ID查看信息
     */
    DictionaryItemVO detail(String id);

    /**
     * 查询列表
     */
    List<DictionaryItemVO> findByList(DictionaryItemQuery query);

    /**
     * 分页查看
     */
    PageResultVo<DictionaryItemVO> findByPage(DictionaryItemQuery query);

    /**
     * 查询子项
     */
    List<DictionaryItemVO> findByDictionaryId(List<String> dictionaryIds);
    /**
     * 依据属性ID删除
     */
    Boolean deleteByAttributeId(String id);

}
